package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.WorkspaceService;
import com.sky.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/workspace")
@Api(value = "工作台相关")
public class WorkspaceController {

    @Autowired
    private WorkspaceService workspaceService;

    @GetMapping("/businessData")
    @ApiOperation("查询今日运营数据")
    public Result<BusinessDataVO> getBusinessData() {
        return Result.success(workspaceService.getBusinessData());
    }

    @GetMapping ("/overviewSetmeals")
    @ApiOperation("查询套餐总览")
    public Result<SetmealOverViewVO> getOverviewSetmeals() {
        return Result.success(workspaceService.getOverviewSetmeals());
    }

    @GetMapping("/overviewDishes")
    @ApiOperation("查询itude菜单")
    public Result<DishOverViewVO> getOverviewDishes() {
        return Result.success(workspaceService.getOverviewDishes());
    }

    @GetMapping("/overviewOrders")
    @ApiOperation("查询订单管理数据")
    public Result<OrderOverViewVO> getOverviewOrders() {
        return Result.success(workspaceService.getOverviewOrders());
    }


}
